home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / CDROM / IDE-fix / InstallSoftware < prev    next >
Text File  |  1999-02-12  |  34KB  |  1,268 lines

  1. ;$VER: IDEfix Install 49.6 (13.02.99)
  2. ;Copyright ©1993-1997 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD" )
  13. (set #instEjectCD 1)
  14. (set #instEject 1)
  15. (set #ReplaceOld 1 )
  16. (set #DeleteOld 1 )
  17.  
  18. (set #wbversion (getversion "libs:version.library"))
  19. (set #wbversion (/ #wbversion 65536) )
  20.  
  21. (complete 0)
  22.  
  23. (if (< #wbversion 37)
  24.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  25.              "\n\nAn upgrade will be needed for your Amiga." )
  26. )
  27.  
  28.  
  29. ;(if (< (getdiskspace "SYS:") 409600)
  30. ;    (abort "\n\nApproximately 400K of disk space is needed on your SYS: volume."
  31. ;             "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  32. ;             "Delete or transfer some files from the SYS: volume and try again." )
  33. ;)
  34.  
  35. (makeassign "CacheCDFSInst" "" ( safe) )
  36.  
  37.  
  38. (set #theirlevel @user-level )
  39.  
  40. (set #Match ( NOT ( run "CacheCDFSInst:C/CheckIDEfix" ( safe ) ) ) )
  41.  
  42. (user 2)
  43.  
  44. (message "\nWelcome to IDE-fix, CacheCDFS2, CD32-Emulator and PlayCD!"
  45.             "\n\nThis package is the complete solution for all your IDE and CD-ROM problems! " 
  46.          "\n\n"
  47.          "IDEfix allows you to use 4 harddisks and SyQuest drives with your IDE port, "
  48.          "ATAPI controls IDE CD-Roms, "
  49.          "CacheCDFS, PlayCD and CD32-Emulator power any IDE or SCSI-II CD-Rom!"
  50.          "\n\nEnjoy it! " )
  51.  
  52.  
  53. ( if (NOT @pretend )
  54.    (
  55.    (if ( run "CacheCDFSInst:Register/Register" )
  56.        (
  57.        (abort)
  58.        )
  59.     )
  60. ))
  61.  
  62. (set #DefaultDir
  63.     (askdir
  64.         (prompt "\n\nSpecify the place, where the IDEfix97 directory will be created:" )
  65.         (help "\n\nIDE-fix and CacheCDFS contain a number of support programs. "
  66.         "This directory will specifiy where the IDEfix97 directory will be placed.")
  67.         (default @default-dest)
  68.         (newpath)
  69.     )
  70. )
  71.  
  72. (user #theirlevel)
  73.  
  74. (set #CDFSDir (tackon #DefaultDir "IDEfix97"))
  75.  
  76. (if (NOT (exists #CDFSDir ))
  77.     (
  78.     (makedir #CDFSDir
  79.         (safe)
  80.         (infos)
  81.     )
  82.     )
  83. )
  84.  
  85. (set @default-dest #CDFSDir)
  86.  
  87.  
  88. (makeassign "CacheCDFS" #CDFSDir (safe))
  89.  
  90. (copyfiles
  91.     (source "CacheCDFSInst:C/UnInstall")
  92.     (prompt )
  93.     (help )
  94.     (infos)
  95.     (dest "CacheCDFS:")
  96. )
  97.  
  98. (if (NOT (exists "CacheCDFS:Backup" ))
  99.     (
  100.  
  101.     (copyfiles
  102.         (source "CacheCDFSInst:C/BackupIDEFixInstall")
  103.         (prompt )
  104.         (help )
  105.         (infos)
  106.         (dest "CacheCDFS:")
  107.     )
  108.  
  109.     (working "\nBacking up old installation ..." )
  110.  
  111.     
  112.     ( if (NOT @pretend )
  113.        (
  114.         (if ( run "CacheCDFS:BackupIDEfixInstall CacheCDFS:Backup save" )
  115.             (
  116.             (abort)
  117.             )
  118.         )
  119.     ))
  120.     )
  121. )
  122.  
  123. (textfile
  124.     (dest  "CacheCDFS:CacheCDFSUninstall.dat" )
  125.     (append "DO NOT DELETE THIS FILE!\n"
  126.               "IT IS NEEDED TO UNINSTALL IDE-FIX '97!\n")
  127. )
  128.  
  129.  
  130. (if (exists "CacheCDFSInst:Installer" )
  131.     (
  132.     (copylib
  133.         (source "CacheCDFSInst:Installer")
  134.         (dest "SYS:Utilities")
  135.     )
  136. ))
  137.  
  138. (working "\nUpdating your System ..." )
  139.  
  140. ( if (NOT @pretend )
  141.    (
  142.     (if ( run "CacheCDFSInst:C/CopyIDELibs CacheCDFSInst:" )
  143.         (
  144.         (message "\n\nPlease reboot your Amiga and start this installation program again!" )
  145.         (makeassign "CacheCDFSInst" (safe))
  146.         (makeassign "CacheCDFS" (safe))
  147.         (exit (quiet ))
  148.         ))
  149.     )
  150. )
  151.  
  152. (copyfiles
  153.     (source "CacheCDFSInst:Register")
  154.     (prompt )
  155.     (help )
  156.     (infos)
  157.     (all)
  158.     (dest "CacheCDFS:Register")
  159. )
  160.     
  161. (tooltype
  162.     (dest "CacheCDFS:Register" )
  163.     (noposition)
  164. )
  165.  
  166. (copylib
  167.     (prompt "This will copy the FormatATAPI program to your C: directory.")
  168.     (help "This will copy the FormatATAPI program to your C: directory.")
  169.     (source "CacheCDFSInst:C/FormatATAPI")
  170.     (confirm)
  171.     (dest "C:")
  172. )
  173.  
  174. (copyfiles
  175.     (prompt "This will copy Icons for the FormatATAPI and MountLS120 programs "
  176.         "to your Harddisk.")
  177.     (help "This will copy Icons for the FormatATAPI and MountLS120 programs "
  178.         "to your Harddisk.")
  179.     (source "CacheCDFSInst:LS120")
  180.     (infos)
  181.     (all)
  182.     (confirm)
  183.     (dest "CacheCDFS:LS120")
  184. )
  185.     
  186. (copyfiles
  187.     (source "CacheCDFSInst:C/InstallLS120")
  188.     (prompt )
  189.     (help )
  190.     (infos)
  191.     (dest "CacheCDFS:")
  192. )
  193.  
  194. (protect "CacheCDFS:FindDevice" "rwed" )
  195. (protect "CacheCDFS:FindDevice.info" "rwed" )
  196.  
  197. (copylib
  198.     (prompt "\n\nCopying the FindDevice program to the "
  199.               "CacheCDFS: directory.\n" )
  200.     (source "CacheCDFSInst:FindDevice")
  201.     (dest "CacheCDFS:")
  202.     (infos)
  203.     (safe)
  204.     (help "\n\nThis will copy over the FindDevice "
  205.             "program to your CacheCDFS: directory\n\nIf you do not "
  206.             "wish the FindDevice program to be transferred to your system, "
  207.             "skip this step." )
  208. )
  209.  
  210. (tooltype
  211.     (dest "CacheCDFS:FindDevice" )
  212.     (noposition)
  213. )
  214.  
  215.  
  216.     (copyfiles
  217.         (prompt "This will copy additional documentation "
  218.             "to your Harddisk. ")
  219.         (help "This will copy additional documentation "
  220.             "to your Harddisk. ")
  221.         (source "CacheCDFSInst:Docs")
  222.         (infos)
  223.         (all)
  224.         (confirm)
  225.         (dest "CacheCDFS:Docs")
  226.     )
  227.     
  228. (tooltype
  229.     (dest "CacheCDFS:Docs" )
  230.     (noposition)
  231. )
  232.  
  233.  
  234. (if (exists "CacheCDFS:FindCD" )
  235.     (
  236.     (protect "CacheCDFS:FindCD" "rwed" )
  237.     (delete "CacheCDFS:FindCD" )
  238.     )
  239. )
  240.  
  241. (if (exists "CacheCDFS:FindCD.info" )
  242.     (
  243.     (protect "CacheCDFS:FindCD.info" "rwed" )
  244.     (delete "CacheCDFS:FindCD.info" )
  245.     )
  246. )
  247.  
  248. (if (exists "L:TandemCacheCDFS" )
  249.     (
  250.     ((set #DeleteOld
  251.         (askbool
  252.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  253.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  254.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  255.               "deleted and \"NO\" if not!")
  256.         (default 1)
  257.         )
  258.     ))
  259.  
  260.     (if #DeleteOld
  261.     ((protect "L:TandemCacheCDFS" "rwed" )
  262.     (delete "L:TandemCacheCDFS" )
  263.     ))
  264. ))
  265.  
  266. (if (exists "L:DemoCacheCDFS" )
  267.     (
  268.     ((set #DeleteOld
  269.         (askbool
  270.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  271.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  272.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  273.               "deleted and \"NO\" if not!")
  274.         (default 1)
  275.         )
  276.     ))
  277.  
  278.     (if #DeleteOld
  279.     ((protect "L:DemoCacheCDFS" "rwed" )
  280.     (delete "L:DemoCacheCDFS" )
  281.     ))
  282. ))
  283.  
  284. (if (= #Match 0)
  285.  
  286.     (
  287.  
  288.     ( working "\nStarting AddIDEfixStartup ..." )
  289.  
  290.     ( run "CacheCDFSInst:C/AddIDEfixStartup" )
  291.  
  292.     (copylib
  293.         (prompt "This will copy the Ship program to your C: directory.")
  294.         (help "This will copy the Ship program to your C: directory.")
  295.         (source "CacheCDFSInst:C/Ship")
  296.         (confirm)
  297.         (dest "C:")
  298.     )
  299.  
  300.     (copylib
  301.         (prompt "This will copy the ActivateCrossIDEfix program to your C: directory.")
  302.         (help "This will copy the ActicateCrossIDEfix program to your C: directory.")
  303.         (source "CacheCDFSInst:C/ActivateCrossIDEfix")
  304.         (confirm)
  305.         (dest "C:")
  306.     )
  307.  
  308.     (startup "ActivateCrossIDEfix"
  309.         (command "ActivateCrossIDEfix ALL\n" )
  310.         (prompt "\n\nInserting ActivateCrossIDEfix into the user-startup")
  311.         (help "\n\nInserting ActivateCrossIDEfix into the user-startup")
  312.     )
  313.  
  314.     (copylib
  315.         (prompt "This will copy the MountIDE program to your C: directory.")
  316.         (help "This will copy the MountIDE program to your C: directory.")
  317.         (source "CacheCDFSInst:C/MountIDE")
  318.         (confirm)
  319.         (dest "C:")
  320.     )
  321.  
  322.     (copylib
  323.         (prompt "This will copy the ConvertDrive program to your C: directory.")
  324.         (help "This will copy the ConvertDrive program to your C: directory.")
  325.         (source "CacheCDFSInst:C/ConvertDrive")
  326.         (confirm)
  327.         (dest "C:")
  328.     )
  329.  
  330.     (copylib
  331.         (prompt "This will copy the AutoParkPrefs program to your SYS:Prefs directory.")
  332.         (help "This will copy the AutoParkPrefs program to your SYS:Prefs directory.")
  333.         (source "CacheCDFSInst:Prefs/AutoParkPrefs")
  334.         (infos)
  335.         (confirm)
  336.         (dest "SYS:Prefs")
  337.     )
  338.  
  339.     (tooltype
  340.         (dest "SYS:Prefs/AutoParkPrefs" )
  341.         (noposition)
  342.     )
  343.  
  344.     (copylib
  345.         (prompt "This will copy the IDEfixPrefs program to your SYS:Prefs directory.")
  346.         (help "This will copy the IDEfixPrefs program to your SYS:Prefs directory.")
  347.         (source "CacheCDFSInst:Prefs/IDEfixPrefs")
  348.         (infos)
  349.         (confirm)
  350.         (dest "SYS:Prefs")
  351.     )
  352.  
  353.     (tooltype
  354.         (dest "SYS:Prefs/IDEfixPrefs" )
  355.         (noposition)
  356.     )
  357.  
  358.     (copyfiles
  359.         (prompt "This will copy Icons for the Ship and MountIDE programs "
  360.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  361.             "SYS:WBStartUp drawer.")
  362.         (help "This will copy Icons for the Ship and MountIDE programs "
  363.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  364.             "SYS:WBStartUp drawer.")
  365.         (source "CacheCDFSInst:Harddisk")
  366.         (infos)
  367.         (all)
  368.         (confirm)
  369.         (dest "CacheCDFS:Harddisk")
  370.     )
  371.     
  372.  
  373.     (tooltype
  374.         (dest "CacheCDFS:Harddisk" )
  375.         (noposition)
  376.     )
  377.  
  378.     (user 2)
  379.  
  380. ;    (message "\nIMPORTANT:\n\n"
  381. ;                "IDEfix and LoadIDE are installed in your C: "
  382. ;             "directory, but You MUST start IDEfix manually, as this program "
  383. ;             "will NOT alter your startup-sequence! "
  384. ;             "\n\nEnter \"IDEfix\" or \"LoadIDE reset\" behind SetPatch in your startup-sequence "
  385. ;             "to use IDEfix! "
  386. ;             "\n\nPlease click PROCEED now.")
  387.  
  388.     (message "\nNote:\n\nYou can use \"AutoParkPrefs\" in you SYS:Prefs directory to adjust autoparking "
  389.              "of your harddrives. Autoparking switches off the motor of a drive, if the drive is "
  390.              "not used for a certain amount of time."
  391.              "\n\nPlease click PROCEED now.")
  392.  
  393.     (message "\nNote:\n\nYou can use \"ConvertDrive\" to convert drives formatted with old controllers "
  394.              "like Apollo AT or GVP AT!\n\n"
  395.              "Enter \"ConvertDrive <device> <unit>\" from the Shell. "
  396.              "\n\nPlease click PROCEED now.")
  397.  
  398.     (message "\nNote:\n\n"
  399.              "Use \"Ship\" to park your harddisks!\n\n"
  400.              "Use \"MountIDE force\" to mount additional SyQuest cartridges!"
  401.              "\n\n\nClick PROCEED to install CD-ROMs.\n\nClick ABORT to quit.")
  402.  
  403.  
  404. ;    ( run "C:IDEfix" )
  405.     )
  406.  
  407. )
  408.  
  409. (user 2)
  410.  
  411. (message "\n\nNow the FindDevice program will be launched to find "
  412.          "the Device and Unit of your CD-Rom..."
  413.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  414.          "\n\nChoose the device and unit and click \"USE\"!"
  415.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  416.          "click CANCEL within FindDevice!")
  417.  
  418. (working "\n\nLaunching the FindDevice program to find "
  419.          "the Device and Unit of your CD-Rom..."
  420.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  421.          "\n\nChoose the device and unit and click \"USE\"!"
  422.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  423.          "click CANCEL within FindDevice!")
  424.  
  425. (set #Product ( run "CacheCDFS:FindDevice" ( safe ) ) )
  426.  
  427.  
  428. (if (= #Product 0 )
  429.     (
  430.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  431.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  432.     ( set #CDROM_NumLuns (+ (getenv "CDROM_NumLuns" )))
  433.     )
  434.  
  435.     (
  436.     ( set #CDROM_NumLuns 1)
  437.     (set #CDROM_Device
  438.         (askstring
  439.             (prompt "\n\nWhat is the name for the exec device driver? " )
  440.             (default "scsi.device" )
  441.             (help "\n\nThis is the name of the device driver to use. "
  442.                     "The name is different for different configurations. "
  443.                     "\n\nConsult the manual of your SCSI/CD-Rom host adapter "
  444.                     "if you don't know the name!" )
  445.         )
  446.     )
  447.  
  448.     (set #CDROM_Unit
  449.         (asknumber
  450.             (prompt "\n\nWhat is the Unit number of your CD-Rom drive?" )
  451.             (default 5 )
  452.             (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
  453.                     "numerical value between 0 and 7." )
  454.         )
  455.     )
  456.  
  457.     )
  458. )
  459.  
  460.     (set #CDROM_NumLuns
  461.         (asknumber
  462.             (prompt "\n\nHow many discs fit in your CD-Rom drive?" )
  463.             (default #CDROM_NumLuns )
  464.             (help "\nThis is the number of logical units of the CD-Rom drive. This is usually a "
  465.                     "numerical value between 1 and 8.\n\n"
  466.                     "If you have a normal CD-Rom, set this to 1.\n\n"
  467.                     "If you have a CD-Rom changer, enter the number of discs that fit in your drive!" )
  468.         )
  469.     )
  470.  
  471. (user #theirlevel)
  472.  
  473. (set #DevFlags 0)
  474.  
  475. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(telmexatapi#?|#?pcmcia#?)" ( safe ) ) )
  476.  
  477. (if (= #Match 0)
  478.     (
  479.     (set #DevFlags 1)
  480.     )
  481. )
  482.  
  483. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandem#?|#?atapi#?|oktagon#?)" ( safe ) ) )
  484.  
  485. (if (= #Match 0)
  486.     ((set #ControlDefault 2))
  487. )
  488.  
  489. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(scsi.#?|???.scsi.#?)" ( safe ) ) )
  490.  
  491. (if (= #Match 0)
  492.     ((set #ControlDefault 5))
  493. )
  494.  
  495. (if (= #CDROM_Device "gvpscsi.device")
  496.     ((set #ControlDefault 8))
  497. )
  498.  
  499.  
  500. (complete 20 )
  501.  
  502. (user 2)
  503.  
  504. (set #ControlMask 
  505.     (askoptions
  506.         (prompt "FileSystem -> Controller Configuration")
  507.         (choices "Use SCSI Direct" 
  508.                     "Use Diskchange Interrupt"
  509.                     "Use 24 Bit-DMA"
  510.                     "Use Motor off" )
  511.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  512.               #CDROM_Device ". If you are "
  513.                 "not sure what option is correct, leave the default settings as they "
  514.                 "are. They should work in most cases.\n"
  515.                 "These options may later be altered using the CDFSprefs program. "
  516.                 "However, wrong settings may lead to crashes if you mount the "
  517.                 "FileSystem!\n"
  518.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  519.  
  520.                 "\"Use SCSI Direct\"\n"
  521.                 "Choose this option if the SCSI controller using "
  522.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  523.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  524.                 "Do NOT choose this option if your controller is a modern, well designed "
  525.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  526.                 "NO SCSI controller at all (TandemCD)!\n\n"
  527.  
  528.                 "\"Use Diskchange Interrupt\"\n"
  529.                 "Choose this option if the controller using "
  530.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  531.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  532.                 "GVP Series-II)\n"
  533.                 "Do NOT choose this option if your controller has problems with diskchange "
  534.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  535.                 "Progressive Peripherals, Emplant)\n\n"
  536.  
  537.                 "\"Use 24 Bit-DMA\"\n"
  538.                 "Choose this option if the SCSI or CD controller using "
  539.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  540.                 "(e.g. A2091 from Commodore).\n"
  541.                 "Do NOT choose this option if your controller is a 32-Bit "
  542.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  543.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  544.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  545.                 "decreased performance!\n\n"
  546.  
  547.                 "\"Use Motor off\"\n"
  548.                 "Choose this option if the SCSI controller using "
  549.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  550.                 "Do NOT choose this option if your controller is anything else."
  551.             )
  552.         (default #ControlDefault)
  553.     )
  554. )
  555.  
  556. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  557. (set #BufMemInt  1 )
  558.  
  559. (if (IN #ControlMask 2)
  560.     (
  561.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  562.     (set #BufMemInt  513 )
  563.     )
  564. )
  565.  
  566. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  567.  
  568.  
  569. (if (IN #ControlMask 0)
  570.     (
  571.     (set #Control (cat #Control " S"))
  572.     )
  573. )
  574.  
  575. (if (NOT (IN #ControlMask 1))
  576.     (
  577.     (set #Control (cat #Control " NC"))
  578.     )
  579. )
  580.  
  581. (if (IN #ControlMask 3)
  582.     (
  583.     (set #Control (cat #Control " M"))
  584.     )
  585. )
  586.  
  587.  
  588. (set #Control (cat #Control "\"\n"))
  589.  
  590.  
  591. (set #autoMount
  592.     (askbool
  593.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  594.                 "NOTE: If you are unsure if your controller will work correctly with "
  595.                 "the controller settings, you should select \"NO\"!" )
  596.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  597.         (default 1)
  598.     )
  599. )
  600.  
  601.  
  602. (if #autoMount
  603.     (set #mountDirectory "DEVS:DOSDrivers")
  604. )
  605.  
  606. (if (not #autoMount)
  607.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  608. )
  609.  
  610. (complete 30 )
  611.  
  612. (user 1)
  613.  
  614. (set #tempCDDevice_NC #CDDevice_NC )
  615. (set #CDROM_ID (/ #CDROM_Unit 100 ))
  616. (set #CDROM_ID (- #CDROM_Unit (* #CDROM_ID 100 )))
  617.  
  618. (if (> #CDROM_NumLuns 1 )
  619.     (
  620.     (if
  621.     ( NOT (askbool
  622.         (prompt "\nYour CD-Rom changer has " #CDROM_NumLuns " discs.\n\n"
  623.                 "Do you wish to access them through different device names?" )
  624.         (help "\n\nClicking YES will mount every disc individually.")
  625.         (default 1)
  626.     ))
  627.     (set #CDROM_NumLuns 1 )
  628.     )
  629.     )
  630. )
  631.  
  632. (set #SlotNumber 0 )
  633.  
  634. ( until (= #CDROM_NumLuns #SlotNumber )
  635.  
  636. (set #CD_DeviceUnit (+ #CDROM_ID (* #SlotNumber 10 )))
  637. (set #CDDevice_NC (cat #tempCDDevice_NC #CD_DeviceUnit))
  638.  
  639. (user 2)
  640.  
  641. (set #CDDevice_NC
  642.     (askstring
  643.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  644.         "(The trailing colon MUST NOT be present)" 
  645.         )
  646.         (default #CDDevice_NC )
  647.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  648.                 "CD-Rom as.  While usually "
  649.                 #CDDevice_NC
  650.                 ", it can be any name you choose. "
  651.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  652.     )
  653. )
  654.  
  655. (user #theirlevel)
  656.  
  657. (set #CDDevice (cat #CDDevice_NC ":") )
  658.  
  659. (if (< #wbversion 38)
  660.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  661.  
  662.     (if #autoMount
  663.         (
  664.  
  665.         (if (NOT (EXISTS "S:IDEfixUserStartup" ))
  666.         ((textfile
  667.             (dest "S:IDEfixUserStartup" )
  668.             (append "; IDEfix User Startup\n"
  669.                       "; © 1997 Elaborate Bytes, O. Kastl\n"
  670.                       "\n")
  671.             )
  672.         (protect "S:IDEfixUserStartup" "srwed" )
  673.         ))
  674.  
  675.         (startup "CacheCDFS"
  676.             (command "IF EXISTS S:IDEfixUserStartup\n"
  677.                      "   EXECUTE S:IDEfixUserStartup\n"
  678.                      "ENDIF\n" )
  679.             (prompt "\n\nInserting IDEfix User Startup into the user-startup")
  680.             (help "\n\nInserting IDEfix User Startup into the user-startup")
  681.         )
  682.  
  683.         (textfile
  684.         (dest "S:IDEfixUserStartup" )
  685.         (include "S:IDEfixUserStartup" )
  686.         (append #startupCommand )
  687.         )
  688.         )
  689.     )
  690.  
  691.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  692.         ((set #ReplaceOld
  693.             (askbool
  694.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  695.                     "Do you want to replace it?" )
  696.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  697.                   "replaced and \"NO\" if not!")
  698.             (default 1)
  699.             )
  700.         ))
  701.     )
  702.  
  703.     (if #ReplaceOld
  704.  
  705.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  706.  
  707.     (textfile
  708.         (dest (cat "devs:MountList." #CDDevice_NC) )
  709.         (append "/***************************************************************/\n"
  710.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  711.                   "/***************************************************************/\n")
  712.         (append #CDDevice "\n")
  713.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  714.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  715.         (append "    Unit           = " #CD_DeviceUnit " /* exec device unit */\n" )
  716.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  717.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  718.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  719.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  720.         (append "    MaxTransfer    = 0x1000000 /* Maximum amount of bytes for direct read */\n")
  721.         (append "    Reserved       = 0 /* Unused */\n")
  722.         (append "    Interleave     = 0 /* Unused */\n")
  723.         (append "    LowCyl         = 0 /* Unused */\n")
  724.         (append "    HighCyl        = 0 /* Unused */\n")
  725.         (append "    Surfaces       = 1 /* Unused */\n")
  726.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  727.         (append "    BufMemType     = " #BufMemType )
  728.         (append "    BootPri        = 2 /* Boot priority for MountCD */\n")
  729.         (append "    GlobVec        = -1 /* Do not change! */\n")
  730.         (append "    Mount          = 1 /* Mount it immediately */\n")
  731.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  732.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  733.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  734.         (append "    Control        = "#Control)
  735.         (append "   /* The Control field is for special adjustments */\n")
  736.         (append "   /* L/S convert all file names to lowercase */\n")
  737.         (append "   /* LV/S convert volume names to lowercase */\n")
  738.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  739.         (append "   /* LFC/N start converting at this character */\n")
  740.         (append "   /* LC/N/A number of blocks per cache line */\n")
  741.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  742.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  743.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  744.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  745.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  746.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  747.         (append "#\n")
  748.     )
  749.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  750.     )
  751.     )
  752. ))
  753.  
  754.  
  755.  
  756. (if (> #wbversion 37)
  757.     (
  758.  
  759.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  760.         ((set #ReplaceOld
  761.             (askbool
  762.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  763.                     "Do you want to replace it?" )
  764.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  765.                   "replaced and \"NO\" if not!")
  766.             (default 1)
  767.             )
  768.         ))
  769.     )
  770.  
  771.     (if #ReplaceOld
  772.  
  773.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  774.  
  775.     (textfile
  776.         (dest (tackon #mountDirectory #CDDevice_NC) )
  777.         (append "/***************************************************************/\n"
  778.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  779.                   "/***************************************************************/\n")
  780.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  781.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  782.         (append "    Unit           = " #CD_DeviceUnit " /* exec device unit */\n" )
  783.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  784.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  785.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  786.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  787.         (append "    MaxTransfer    = 0x1000000 /* Maximum amount of bytes for direct read */\n")
  788.         (append "    Reserved       = 0 /* Unused */\n")
  789.         (append "    Interleave     = 0 /* Unused */\n")
  790.         (append "    LowCyl         = 0 /* Unused */\n")
  791.         (append "    HighCyl        = 0 /* Unused */\n")
  792.         (append "    Surfaces       = 1 /* Unused */\n")
  793.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  794.         (append "    BufMemType     = " #BufMemType )
  795.         (append "    BootPri        = 2 /* Boot priority for MountCD */\n")
  796.         (append "    GlobVec        = -1 /* Do not change! */\n")
  797.         (append "    Mount          = 1 /* Mount it immediately */\n")
  798.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  799.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  800.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  801.         (append "    Control        = "#Control)
  802.         (append "   /* The Control field is for special adjustments */\n")
  803.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  804.         (append "   /* LV/S convert volume names to lowercase */\n")
  805.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  806.         (append "   /* LFC/N start converting at this character */\n")
  807.         (append "   /* LC/N/A number of blocks per cache line */\n")
  808.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  809.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  810.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  811.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  812.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  813.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  814.     )
  815.  
  816.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  817.  
  818.     (copyfiles
  819.             (prompt "\n\nCopying Mountlist icon")
  820.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  821.             (dest #mountDirectory)
  822.             (newname (cat #CDDevice_NC ".info"))
  823.             (help "\n\nThis will copy over an icon for the mountlist file.")
  824.             (confirm)
  825.  
  826.     ))
  827.     )
  828.  
  829.     (protect "S:User-Startup" "srwed" )
  830.     (startup "CacheCDFS"
  831.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  832.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  833.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  834.                 "an earlier installation." )
  835.         )
  836.  
  837.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  838.  
  839.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  840.         (delete (cat "devs:MountList." #CDDevice_NC)
  841.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  842.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  843.                     "if it is present from an earlier installation." )
  844.             (confirm)
  845.             )
  846.         ))
  847.     )
  848. )
  849.  
  850. (set #SlotNumber (+ #SlotNumber 1 ))
  851.  
  852. (set #doMount
  853.     (askbool
  854.     (prompt "\n\nMount " #CDDevice " now ?")
  855.     (help "Select, if your CD-Rom should be mounted now, or not.")
  856.     (default 1)
  857.     )
  858. )
  859.  
  860. ( if @pretend ((set #doMount 0))) 
  861.  
  862. (if #doMount
  863.     (
  864.     (working "\n\nMounting CD-Rom...."
  865.              "\n\nPlease Wait!")
  866.  
  867.         ( run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  868.  
  869.         (if (< #wbversion 38)
  870.             (
  871.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  872.             )
  873.         )
  874.  
  875.         (if (> #wbversion 37)
  876.             (
  877.                 (run (cat "C:Mount " #CDDevice  ))
  878.             )
  879.         )
  880. ))
  881.  
  882. )
  883.  
  884. (complete 40 )
  885.  
  886. (if ( NOT (= #theirlevel 2 ) )
  887.     (
  888.     (set #instChanger ( NOT ( run "CacheCDFSInst:Changer DEVICE="#CDROM_Device" UNIT="#CDROM_Unit" TEST" ( safe ) ) ) )
  889.     )
  890. )
  891.  
  892. (if (= #theirlevel 2 )
  893.     (
  894.     (set #instChanger 1)
  895.     )
  896. )
  897.  
  898. (if #instChanger
  899.     ((set #instChanger
  900.         (askbool
  901.             (prompt "\n\nShould the ATAPI Changer utility be installed?\n\n"
  902.                       "NOTE: This program is only required, if you have an ATAPI "
  903.                       "CD-ROM changer!" )
  904.             (help "\n\nThis will copy over the ATAPI Changer utility "
  905.                     "to your harddisk.\n\nIf you do not "
  906.                     "wish the Changer program to be transferred to your system, "
  907.                     "skip this step.\n" )
  908.             (default 1)
  909.         )
  910.     )
  911. ))
  912.  
  913. (if #instChanger
  914.     (
  915.     (if (exists "CacheCDFS:AtapiChanger" )
  916.         (
  917.         (protect "CacheCDFS:AtapiChanger" "rwed" )
  918.         (delete "CacheCDFS:AtapiChanger" )
  919.         )
  920.     )
  921.  
  922.     (if (exists "CacheCDFS:AtapiChanger.info" )
  923.         (
  924.         (protect "CacheCDFS:AtapiChanger.info" "rwed" )
  925.         (delete "CacheCDFS:AtapiChanger.info" )
  926.         )
  927.     )
  928.  
  929.     (protect "CacheCDFS:Changer" "rwed" )
  930.     (protect "CacheCDFS:Changer.info" "rwed" )
  931.     (copylib
  932.         (prompt "\n\nCopying the Changer program to the "
  933.                   "CacheCDFS: directory." )
  934.         (source "CacheCDFSInst:Changer")
  935.         (dest "CacheCDFS:")
  936.         (help "\n\nThis will copy over the ATAPI Changer utility "
  937.                 "to your harddisk.\n\nIf you do not "
  938.                 "wish the Changer program to be transferred to your system, "
  939.                 "skip this step.\n" )
  940.         (infos)
  941.         (confirm)
  942.     )
  943.  
  944.     (tooltype
  945.         (dest "CacheCDFS:Changer" )
  946.         (settooltype "DEVICE" #CDROM_Device )
  947.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  948.         (noposition)
  949.     )
  950. ))
  951.  
  952. (complete 50 )
  953.  
  954. (set #instCDFSprefs
  955.     (askbool
  956.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  957.         (help "\n\nThis will copy over the CDFSprefs utility "
  958.                 "to your SYS:Prefs directory\n\nIf you do not "
  959.                 "wish the CDFSprefs program to be transferred to your system, "
  960.                 "skip this step.\n" )
  961.         (default 1)
  962.     )
  963. )
  964.  
  965. (if #instCDFSprefs
  966.     ((protect "SYS:Prefs/CDFSprefs" "rwed" )
  967.     (protect "SYS:Prefs/CDFSprefs.info" "rwed" )
  968.     (copylib
  969.         (prompt "\n\nCopying the CDFSprefs program to the "
  970.                   "SYS:Prefs directory." )
  971.         (source "CacheCDFSInst:Prefs/CDFSprefs")
  972.         (dest "SYS:Prefs")
  973.         (infos)
  974.         (help "\n\nThis will copy over the CDFSprefs "
  975.                 "program to your SYS:Prefs directory\n\nIf you do not "
  976.                 "wish the CDFSprefs program to be transferred to your system, "
  977.                 "skip this step." )
  978.         (confirm)
  979.     )
  980.  
  981.     (tooltype
  982.         (dest "SYS:Prefs/CDFSprefs" )
  983.         (noposition)
  984.     )
  985. ))
  986.  
  987. (complete 60 )
  988.  
  989. (set #instKillDev
  990.     (askbool
  991.         (prompt "\n\nShould the KillDev utility be installed?")
  992.         (help "\n\nThis will copy over the KillDev utility "
  993.                 "to your CacheCDFS directory\n\nIf you do not "
  994.                 "wish the KillDev program to be transferred to your system, "
  995.                 "skip this step." )
  996.         (default 1)
  997.     )
  998. )
  999.  
  1000. (if #instKillDev
  1001.     ((protect "CacheCDFS:KillDev" "rwed" )
  1002.     (protect "CacheCDFS:KillDev.info" "rwed" )
  1003.     (copylib
  1004.         (prompt "\n\nCopying the KillDev program to the "
  1005.                   "CacheCDFS: directory.\n" )
  1006.         (source "CacheCDFSInst:KillDev")
  1007.         (dest "CacheCDFS:")
  1008.         (infos)
  1009.         (help "\n\nThis will copy over the KillDev "
  1010.                 "program to your CacheCDFS: directory\n\nIf you do not "
  1011.                 "wish the KillDev program to be transferred to your system, "
  1012.                 "skip this step." )
  1013.         (confirm)
  1014.     )
  1015.  
  1016.     (tooltype
  1017.         (dest "CacheCDFS:KillDev" )
  1018.         (settooltype "DOSDEV" #CDDevice )
  1019.         (noposition)
  1020.     )
  1021. ))
  1022.  
  1023. (if #instEject
  1024.     (
  1025.     (set #instEject
  1026.     (askbool
  1027.         (prompt "\n\nShould the Eject utility be installed?")
  1028.         (help "\n\nThis will copy over the Eject utility "
  1029.                 "to your CDFS directory\n\nIf you do not "
  1030.                 "wish the Eject program to be transferred to your system, "
  1031.                 "skip this step.\n" )
  1032.         (default 1)
  1033.     )
  1034.     ))
  1035. )
  1036.  
  1037. (if #instEject
  1038.     ((protect "CacheCDFS:Eject" "rwed" )
  1039.     (protect "CacheCDFS:Eject.info" "rwed" )
  1040.     (copylib
  1041.         (prompt "\n\nCopying Eject program to the "
  1042.                   "CacheCDFS: directory.\n" )
  1043.         (source "CacheCDFSInst:Eject")
  1044.         (dest "CacheCDFS:")
  1045.         (help "\n\nThis will copy over the Eject utility "
  1046.                 "to your CacheCDFS directory\n\nIf you do not "
  1047.                 "wish the Eject program to be transferred to your system, "
  1048.                 "skip this step.\n" )
  1049.         (infos)
  1050.         (confirm)
  1051.     )
  1052.  
  1053. ))
  1054.  
  1055. (complete 70 )
  1056.  
  1057.  
  1058. (if #instEjectCD
  1059.     (
  1060.     (set #instEjectCD
  1061.     (askbool
  1062.         (prompt "\n\nShould the EjectCD utility be installed?")
  1063.         (help "\n\nThis will copy over the EjectCD utility "
  1064.                 "to your CDFS directory\n\nIf you do not "
  1065.                 "wish the EjectCD program to be transferred to your system, "
  1066.                 "skip this step.\n" )
  1067.         (default 1)
  1068.     )
  1069.     ))
  1070. )
  1071.  
  1072. (if #instEjectCD
  1073.     ((protect "CacheCDFS:EjectCD" "rwed" )
  1074.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  1075.     (copylib
  1076.         (prompt "\n\nCopying EjectCD program to the "
  1077.                   "CacheCDFS: directory.\n" )
  1078.         (source "CacheCDFSInst:EjectCD")
  1079.         (dest "CacheCDFS:")
  1080.         (help "\n\nThis will copy over the EjectCD utility "
  1081.                 "to your CacheCDFS directory\n\nIf you do not "
  1082.                 "wish the EjectCD program to be transferred to your system, "
  1083.                 "skip this step.\n" )
  1084.         (infos)
  1085.         (confirm)
  1086.     )
  1087.  
  1088.     (tooltype
  1089.         (dest "CacheCDFS:EjectCD" )
  1090.         (settooltype "DEVICE" #CDROM_Device )
  1091.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1092.         (noposition)
  1093.     )
  1094. ))
  1095.  
  1096. (set #instPlayCD 0)
  1097.  
  1098. (if (exists "CacheCDFSInst:PlayCD.lha")
  1099.  
  1100. ((set #instPlayCD
  1101.     (askbool
  1102.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  1103.         (help "\n\nThis will copy over the PlayCD drawer "
  1104.                 "to your CacheCDFS directory\n\nIf you do not "
  1105.                 "wish the PlayCD drawer to be transferred to your system, "
  1106.                 "skip this step." )
  1107.         (default 1)
  1108.     )
  1109. )))
  1110.  
  1111. (if #instPlayCD
  1112.     (
  1113.  
  1114.     (working "\n\nDecrunching PlayCD...."
  1115.              "\n\nPlease Wait!")
  1116.  
  1117.     ( if (NOT @pretend )
  1118.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  1119.         (
  1120.         (abort "\n\nUnable to decrunch PlayCD!")
  1121.         )
  1122.     )))
  1123.  
  1124.  
  1125.     (tooltype
  1126.         (dest "CacheCDFS:PlayCD/PlayCD" )
  1127.         (settooltype "DEVICE" #CDROM_Device )
  1128.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1129.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  1130.     )
  1131.     )
  1132. )
  1133.  
  1134. (complete 80 )
  1135.  
  1136.  
  1137. (set #instJukebox 0)
  1138.  
  1139. (if (exists "CacheCDFSInst:JukeBox.lha")
  1140. ((set #instJukebox
  1141.     (askbool
  1142.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  1143.         (help "\n\nThis will copy over the JukeBox drawer "
  1144.                 "to your CacheCDFS directory\n\nIf you do not "
  1145.                 "wish the JukeBox drawer to be transferred to your system, "
  1146.                 "skip this step." )
  1147.         (default 1)
  1148.     )
  1149. )))
  1150.  
  1151. (if #instJukebox
  1152.     (
  1153.     (protect "CacheCDFS:JukeBox" "rwed" )
  1154.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  1155.     (makedir "CacheCDFS:JukeBox" 
  1156.         (infos)
  1157.         (prompt "\n\nCreating drawer for JukeBox\n")
  1158.         (help "\n\nThis will create a drawer for the JukeBox "
  1159.                 "Audio Player." )
  1160.     )
  1161.  
  1162.  
  1163. (working "\n\nDecrunching Jukebox...."
  1164.          "\n\nPlease Wait!")
  1165.  
  1166.     ( if (NOT @pretend )
  1167.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  1168.         (
  1169.         (makeassign "JukeBox")
  1170.         (abort "\n\nUnable to decrunch JukeBox!")
  1171.         )
  1172.     )))
  1173.  
  1174.  
  1175.     (tooltype
  1176.         (dest "CacheCDFS:Jukebox/JukeBox" )
  1177.         (settooltype "DEVICE" #CDROM_Device )
  1178.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1179.     )
  1180.  
  1181. ))
  1182.  
  1183.  
  1184. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  1185.  
  1186.     ((complete 90 )
  1187.  
  1188.     (set #instCD32
  1189.         (askbool
  1190.             (prompt "\n\nShould the CD32-Emulator be installed?"
  1191.                     "\n\nNote that the CD32-Emulator is completely useless "
  1192.                     "if you don't have an Amiga with AA/AGA chipset and "
  1193.                     "at least Kickstart version 3.0!")
  1194.             (help "\n\nThis will copy over the CD32 drawer "
  1195.                     "to your CacheCDFS directory\n\nIf you do not "
  1196.                     "wish the CD32 drawer to be transferred to your system, "
  1197.                     "skip this step.")
  1198.             (default 1)
  1199.         )
  1200.     )
  1201.  
  1202.     (if #instCD32
  1203.         (
  1204.         (working "\n\nDecrunching CD32...."
  1205.                  "\n\nPlease Wait!")
  1206.  
  1207.         ( if (NOT @pretend )
  1208.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  1209.             (
  1210.             (abort "\n\nUnable to decrunch CD32!")
  1211.             )
  1212.         )))
  1213.  
  1214.     
  1215.         (if (exists "CacheCDFSInst:CD32" )
  1216.             ((copylib
  1217.                 (prompt "This will copy the CD32 program.")
  1218.                 (help "This will copy the CD32 program.")
  1219.                 (source "CacheCDFSInst:CD32")
  1220.                 (infos)
  1221.                 (dest "CacheCDFS:CD32")
  1222.                 (confirm)
  1223.             ))
  1224.         )
  1225.  
  1226.  
  1227.         ( set #CDROM_Blocks 2 )
  1228.  
  1229.         (if (= #CDROM_Device "tandemcd.device")
  1230.             (
  1231.             ( set #CDROM_Blocks 4 )
  1232.             )
  1233.         )
  1234.  
  1235.         (if (= #CDROM_Device "tandemat.device")
  1236.             (
  1237.             ( set #CDROM_Blocks 4 )
  1238.             )
  1239.         )
  1240.  
  1241.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  1242.             (
  1243.             ( set #CDROM_Blocks 4 )
  1244.             )
  1245.         )
  1246.  
  1247.         (if (= #CDROM_Device "tandemcd_come.device")
  1248.             (
  1249.             ( set #CDROM_Blocks 4 )
  1250.             )
  1251.         )
  1252.  
  1253.         (tooltype
  1254.             (dest "CacheCDFS:CD32/CD32" )
  1255.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  1256.             (settooltype "DOSDEV" #CDDevice_NC)
  1257.             )
  1258.  
  1259.     ))
  1260. ))
  1261.  
  1262. (complete 100 )
  1263.  
  1264.  
  1265. (makeassign "CacheCDFSInst" (safe))
  1266. (makeassign "CacheCDFS" (safe))
  1267.  
  1268.